package com.moss.cloud.base.biz.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.moss.cloud.base.api.model.from.BaseFrom;
import com.moss.cloud.base.api.model.from.OAuthClientFrom;
import com.moss.cloud.base.api.model.param.ClientPageParam;
import com.moss.cloud.base.api.model.vo.ClientVO;
import com.moss.cloud.base.biz.model.SysClient;

/**
 * 客户端管理业务接口
 *
 * @author 瑾年
 * @date 2023年11月19日
 */
public interface ISysClientService extends IService<SysClient> {
    /**
     * 客户端分页查询
     *
     * @param pageParam
     * @return
     */
    IPage<ClientVO> clientPage(ClientPageParam pageParam);

    /**
     * 新增保存客户端
     *
     * @param clientFrom
     * @return
     */
    Boolean saveClient(OAuthClientFrom clientFrom);

    /**
     * 修改客户端
     *
     * @param clientFrom
     * @return
     */
    Boolean updateClient(OAuthClientFrom clientFrom);

    /**
     * 删除客户端
     *
     * @param baseFrom
     * @return
     */
    Boolean removeClient(BaseFrom baseFrom);

    /**
     * 查看客户端秘钥
     *
     * @param baseFrom
     * @return
     */
    String viewClientSecret(BaseFrom baseFrom);

    /**
     * 重置客户端秘钥
     *
     * @param baseFrom
     * @return
     */
    Boolean resetSecret(BaseFrom baseFrom);
}
